/*
* FaceCat图形通讯框架
* 著作权编号:2015SR229355+2020SR0266727
* 上海卷卷猫信息技术有限公司
*/

#include "stdafx.h"
#include "FCDraw.h"

static String m_systemFont;

MyColor::MyColor(){
    m_lastStyle = -1;
}

void MyColor::setSystemFont(String value){
    m_systemFont = value;
    FCNative::addChangeID();
}

String MyColor::getSystemFont(){
    if ((int)m_systemFont.length() == 0)
    {
        m_systemFont = L"Heiti SC";
    }
    return m_systemFont;
}

static int m_style = 0;

int MyColor::getStyle(){
    return m_style;
}
void MyColor::setStyle(int value){
    m_style = value;
}

void MyColor::createColors(){
    m_userColors.clear();
    if (m_style == 1)
    {
        /*m_userColors.put(USERCOLOR, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR100, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR101, FCColor::rgba(0, 0, 0, 100)); //1
        m_userColors.put(USERCOLOR102, FCColor::rgb(0, 0, 0)); //1
        m_userColors.put(USERCOLOR103, FCColor::rgb(0, 0, 0)); //1
        m_userColors.put(USERCOLOR104, FCColor::rgb(42, 138, 195));
        m_userColors.put(USERCOLOR105, FCColor::rgba(0, 0, 0, 25)); //1
        m_userColors.put(USERCOLOR106, FCColor::rgb(255, 255, 255)); //1
        m_userColors.put(USERCOLOR107, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(USERCOLOR108, FCColor::rgb(255, 255, 255)); //1
        m_userColors.put(USERCOLOR109, FCColor::rgb(43, 138, 195));
        m_userColors.put(USERCOLOR110, FCColor::rgba(0, 0, 0, 200)); //1
        m_userColors.put(USERCOLOR111, FCColor::rgb(255, 255, 255)); //1
        m_userColors.put(USERCOLOR112, FCColor::rgba(200, 200, 200, 240)); //1
        m_userColors.put(USERCOLOR113, FCColor::rgba(200, 200, 200, 100)); //1
        m_userColors.put(USERCOLOR114, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(USERCOLOR115, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(USERCOLOR116, FCColor::rgb(150, 150, 150)); //1
        m_userColors.put(USERCOLOR117, FCColor::rgba(0, 0, 0, 5)); //1
        m_userColors.put(USERCOLOR118, FCColor::rgba(0, 0, 0, 50)); //1
        m_userColors.put(USERCOLOR119, FCColor::rgb(50, 50, 50)); //1
        m_userColors.put(USERCOLOR120, FCColor::rgb(175, 175, 175)); //1
        m_userColors.put(USERCOLOR121, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR122, FCColor::rgba(43, 138, 195, 100));
        m_userColors.put(USERCOLOR123, FCColor::rgb(150, 150, 150)); //1
        m_userColors.put(USERCOLOR124, FCColor::rgb(255, 82, 82));
        m_userColors.put(USERCOLOR125, FCColor::rgb(50, 105, 217));
        m_userColors.put(USERCOLOR126, FCColor::rgb(0, 0, 0)); //1
        m_userColors.put(USERCOLOR127, FCColor::rgb(50, 50, 50)); //1
        m_userColors.put(USERCOLOR128, FCColor::rgb(175, 175, 175));
        m_userColors.put(USERCOLOR129, FCColor::rgb(225, 225, 225));
        m_userColors.put(USERCOLOR130, FCColor::rgb(255, 0, 0)); //1
        m_userColors.put(USERCOLOR131, FCColor::rgb(139, 180, 248));
        m_userColors.put(USERCOLOR132, FCColor::rgb(0, 165, 137));
        m_userColors.put(USERCOLOR133, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR134, FCColor::rgba(150, 150, 150, 200)); //1
        m_userColors.put(USERCOLOR135, FCColor::rgba(43, 138, 195, 200));
        m_userColors.put(USERCOLOR136, FCColor::rgb(255, 80, 80));
        m_userColors.put(USERCOLOR137, FCColor::rgba(43, 138, 195, 25));
        m_userColors.put(USERCOLOR138, FCColor::rgba(51, 153, 255, 75));
        m_userColors.put(USERCOLOR139, FCColor::rgb(0, 200, 0));
        m_userColors.put(USERCOLOR140, FCColor::rgba(255, 255, 255, 10)); //1
        m_userColors.put(USERCOLOR141, FCColor::rgba(200, 200, 200, 50)); //1
        m_userColors.put(USERCOLOR142, FCColor::rgb(0, 105, 217));
        m_userColors.put(USERCOLOR143, FCColor::rgba(0, 0, 0, 150)); //1
        m_userColors.put(USERCOLOR144, FCColor::rgba(255, 0, 0, 200));
        m_userColors.put(USERCOLOR145, FCColor::rgba(170, 178, 189, 50));
        m_userColors.put(USERCOLOR146, FCColor::rgba(170, 178, 189, 200));
        m_userColors.put(USERCOLOR147, FCColor::rgb(219, 68, 83));
        m_userColors.put(USERCOLOR148, FCColor::rgb(255, 80, 80));
        m_userColors.put(USERCOLOR149, FCColor::rgb(246, 187, 67));
        m_userColors.put(USERCOLOR150, FCColor::rgb(59, 174, 218));
        m_userColors.put(USERCOLOR151, FCColor::rgb(216, 112, 173));
        m_userColors.put(USERCOLOR152, FCColor::rgb(140, 192, 81));
        m_userColors.put(USERCOLOR153, FCColor::rgb(80, 255, 80));
        m_userColors.put(USERCOLOR154, FCColor::rgba(255, 80, 80, 200));
        m_userColors.put(USERCOLOR155, FCColor::rgba(200, 200, 200, 150)); //1
        m_userColors.put(USERCOLOR156, FCColor::rgba(0, 105, 217, 240));
        m_userColors.put(USERCOLOR157, FCColor::rgba(255, 255, 255, 25)); //1
        m_userColors.put(USERCOLOR158, FCColor::rgb(255, 215, 0));
        m_userColors.put(USERCOLOR159, FCColor::rgb(100, 100, 100)); //1
        m_userColors.put(USERCOLOR160, FCColor::rgba(255, 255, 255, 200)); //1
        m_userColors.put(USERCOLOR161, FCColor::rgba(43, 138, 195, 50));
        m_userColors.put(USERCOLOR162, FCColor::rgb(10, 36, 106));
        m_userColors.put(USERCOLOR163, FCColor::rgb(255, 255, 255)); //1
        m_userColors.put(USERCOLOR164, FCColor::rgba(255, 255, 255, 100)); //1
        m_userColors.put(USERCOLOR165, FCColor::rgba(255, 255, 255, 50)); //1
        m_userColors.put(USERCOLOR166, FCColor::rgb(20, 20, 20)); //1
        m_userColors.put(USERCOLOR167, FCColor::rgb(220, 220, 220)); //1
        m_userColors.put(USERCOLOR168, FCColor::rgb(248, 73, 96));
        m_userColors.put(USERCOLOR169, FCColor::rgb(15, 193, 118));
        m_userColors.put(USERCOLOR170, FCColor::rgba(248, 73, 96, 150));
        m_userColors.put(USERCOLOR171, FCColor::rgba(15, 193, 118, 150));
        m_userColors.put(USERCOLOR172, FCColor::rgb(130, 140, 150));
        m_userColors.put(USERCOLOR173, FCColor::rgba(94, 102, 115, 200));
        m_userColors.put(USERCOLOR174, FCColor::rgb(83, 195, 42));
        m_userColors.put(USERCOLOR175, FCColor::rgb(231, 192, 42));
        m_userColors.put(USERCOLOR176, FCColor::rgb(254, 89, 82));
        m_userColors.put(USERCOLOR177, FCColor::rgba(42, 138, 195, 100));
        m_userColors.put(USERCOLOR178, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(USERCOLOR179, FCColor::rgba(200, 200, 200, 150)); //1
        m_userColors.put(USERCOLOR180, FCColor::rgb(16, 95, 205));
        m_userColors.put(USERCOLOR181, FCColor::rgba(16, 95, 205, 100));
        m_userColors.put(USERCOLOR182, FCColor::rgb(150, 150, 150)); //1
        m_userColors.put(USERCOLOR183, FCColor::rgb(20, 20, 20)); //1
        m_userColors.put(USERCOLOR184, FCColor::rgb(70, 76, 79));
        m_userColors.put(USERCOLOR185, FCColor::rgb(200, 200, 200));
        m_userColors.put(USERCOLOR186, FCColor::rgb(210, 210, 210)); //1
        m_userColors.put(USERCOLOR187, FCColor::rgb(184, 185, 186));
        m_userColors.put(USERCOLOR188, FCColor::rgb(100, 100, 100)); //1
        m_userColors.put(USERCOLOR189, FCColor::rgb(255, 255, 80));
        m_userColors.put(USERCOLOR190, FCColor::rgba(42, 138, 195, 200));  //1
        m_userColors.put(USERCOLOR191, FCColor::rgba(220, 220, 220, 50));
        m_userColors.put(USERCOLOR192, FCColor::rgba(200, 200, 200, 25));
        m_userColors.put(USERCOLOR193, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(USERCOLOR194, FCColor::rgb(128, 128, 128));
        m_userColors.put(USERCOLOR195, FCColor::rgb(150, 0, 0));
        m_userColors.put(USERCOLOR196, FCColor::rgb(80, 255, 255));
        m_userColors.put(USERCOLOR197, FCColor::rgb(217, 217, 68));
        m_userColors.put(USERCOLOR198, FCColor::rgb(112, 112, 112));
        m_userColors.put(USERCOLOR199, FCColor::rgb(192, 192, 192));
        m_userColors.put(USERCOLOR200, FCColor::rgb(255, 255, 0));
        m_userColors.put(USERCOLOR201, FCColor::rgba(255, 255, 255, 200));
        m_userColors.put(USERCOLOR202, FCColor::rgba(43, 138, 195, 240));
        m_userColors.put(USERCOLOR203, FCColor::rgba(230, 230, 230, 240));
        m_userColors.put(USERCOLOR204, FCColor::rgba(0, 0, 0, 12)); //1
        m_userColors.put(USERCOLOR205, FCColor::rgb(222, 86, 122));
        m_userColors.put(USERCOLOR206, FCColor::rgb(115, 183, 72));
        m_userColors.put(USERCOLOR207, FCColor::rgba(219, 68, 83, 200));
        m_userColors.put(USERCOLOR208, FCColor::rgba(140, 192, 81, 200));
        m_userColors.put(USERCOLOR209, FCColor::rgb(15, 193, 118));
        m_userColors.put(USERCOLOR210, FCColor::rgba(220, 220, 220, 100));
        m_userColors.put(USERCOLOR211, FCColor::rgba(42, 138, 195, 230));
        m_userColors.put(USERCOLOR212, FCColor::rgba(15, 193, 118, 50));
        m_userColors.put(USERCOLOR213, FCColor::rgba(248, 73, 96, 50));
        m_userColors.put(USERCOLOR214, FCColor::rgba(170, 178, 189, 25));
        m_userColors.put(USERCOLOR215, FCColor::rgb(217, 218, 223));
        m_userColors.put(USERCOLOR216, FCColor::rgb(167, 171, 184));
        m_userColors.put(FCColor_Back, FCColor::rgb(255, 255, 255)); //1
        m_userColors.put(FCColor_Border, FCColor::rgb(200, 200, 200)); //1
        m_userColors.put(FCColor_Text, FCColor::rgb(0, 0, 0)); //1
        m_userColors.put(FCColor_DisabledBack, FCColor::rgba(0, 0, 0, 25)); //1
        m_userColors.put(FCColor_DisabledText, 3289650);
        m_userColors.put(FCColor_Hovered, FCColor::rgba(43, 138, 195, 150));
        m_userColors.put(FCColor_Pushed, FCColor::rgba(43, 138, 195, 100));*/
        m_userColors.put(USERCOLOR100, (Long)0);
        m_userColors.put(USERCOLOR101, (Long)-100);
        m_userColors.put(USERCOLOR102, (Long)0);
        m_userColors.put(USERCOLOR103, (Long)0);
        m_userColors.put(USERCOLOR104, (Long)12814890);
        m_userColors.put(USERCOLOR105, (Long)-25);
        m_userColors.put(USERCOLOR106, (Long)16777215);
        m_userColors.put(USERCOLOR107, (Long)13158600);
        m_userColors.put(USERCOLOR108, (Long)16777215);
        m_userColors.put(USERCOLOR109, (Long)12814891);
        m_userColors.put(USERCOLOR110, (Long)-200);
        m_userColors.put(USERCOLOR111, (Long)16777215);
        m_userColors.put(USERCOLOR112, (Long)-13158600240);
        m_userColors.put(USERCOLOR113, (Long)-13158600100);
        m_userColors.put(USERCOLOR114, (Long)13158600);
        m_userColors.put(USERCOLOR115, (Long)13158600);
        m_userColors.put(USERCOLOR116, (Long)9868950);
        m_userColors.put(USERCOLOR117, (Long)-5);
        m_userColors.put(USERCOLOR118, (Long)-50);
        m_userColors.put(USERCOLOR119, (Long)3289650);
        m_userColors.put(USERCOLOR120, (Long)11513775);
        m_userColors.put(USERCOLOR121, (Long)0);
        m_userColors.put(USERCOLOR122, (Long)-12814891100);
        m_userColors.put(USERCOLOR123, (Long)9868950);
        m_userColors.put(USERCOLOR124, (Long)5395199);
        m_userColors.put(USERCOLOR125, (Long)14248242);
        m_userColors.put(USERCOLOR126, (Long)0);
        m_userColors.put(USERCOLOR127, (Long)3289650);
        m_userColors.put(USERCOLOR128, (Long)11513775);
        m_userColors.put(USERCOLOR129, (Long)14803425);
        m_userColors.put(USERCOLOR130, (Long)255);
        m_userColors.put(USERCOLOR131, (Long)16299147);
        m_userColors.put(USERCOLOR132, (Long)9020672);
        m_userColors.put(USERCOLOR133, (Long)0);
        m_userColors.put(USERCOLOR134, (Long)-9868950200);
        m_userColors.put(USERCOLOR135, (Long)-12814891200);
        m_userColors.put(USERCOLOR136, (Long)5263615);
        m_userColors.put(USERCOLOR137, (Long)-12814891025);
        m_userColors.put(USERCOLOR138, (Long)-16750899075);
        m_userColors.put(USERCOLOR139, (Long)51200);
        m_userColors.put(USERCOLOR140, (Long)-16777215010);
        m_userColors.put(USERCOLOR141, (Long)-13158600050);
        m_userColors.put(USERCOLOR142, (Long)14248192);
        m_userColors.put(USERCOLOR143, (Long)-150);
        m_userColors.put(USERCOLOR144, (Long)-255200);
        m_userColors.put(USERCOLOR145, (Long)-12432042050);
        m_userColors.put(USERCOLOR146, (Long)-12432042200);
        m_userColors.put(USERCOLOR147, (Long)5457115);
        m_userColors.put(USERCOLOR148, (Long)5263615);
        m_userColors.put(USERCOLOR149, (Long)4439030);
        m_userColors.put(USERCOLOR150, (Long)14331451);
        m_userColors.put(USERCOLOR151, (Long)11366616);
        m_userColors.put(USERCOLOR152, (Long)5357708);
        m_userColors.put(USERCOLOR153, (Long)5308240);
        m_userColors.put(USERCOLOR154, (Long)-5263615200);
        m_userColors.put(USERCOLOR155, (Long)-13158600150);
        m_userColors.put(USERCOLOR156, (Long)-14248192240);
        m_userColors.put(USERCOLOR157, (Long)-16777215025);
        m_userColors.put(USERCOLOR158, (Long)55295);
        m_userColors.put(USERCOLOR159, (Long)6579300);
        m_userColors.put(USERCOLOR160, (Long)-16777215200);
        m_userColors.put(USERCOLOR161, (Long)-12814891050);
        m_userColors.put(USERCOLOR162, (Long)6956042);
        m_userColors.put(USERCOLOR163, (Long)16777215);
        m_userColors.put(USERCOLOR164, (Long)-16777215100);
        m_userColors.put(USERCOLOR165, (Long)-16777215050);
        m_userColors.put(USERCOLOR166, (Long)1315860);
        m_userColors.put(USERCOLOR167, (Long)14474460);
        m_userColors.put(USERCOLOR168, (Long)6310392);
        m_userColors.put(USERCOLOR169, (Long)7782671);
        m_userColors.put(USERCOLOR170, (Long)-6310392150);
        m_userColors.put(USERCOLOR171, (Long)-7782671150);
        m_userColors.put(USERCOLOR172, (Long)9866370);
        m_userColors.put(USERCOLOR173, (Long)-7562846200);
        m_userColors.put(USERCOLOR174, (Long)2802515);
        m_userColors.put(USERCOLOR175, (Long)2801895);
        m_userColors.put(USERCOLOR176, (Long)5396990);
        m_userColors.put(USERCOLOR177, (Long)-12814890100);
        m_userColors.put(USERCOLOR178, (Long)13158600);
        m_userColors.put(USERCOLOR179, (Long)-13158600150);
        m_userColors.put(USERCOLOR180, (Long)13459216);
        m_userColors.put(USERCOLOR181, (Long)-13459216100);
        m_userColors.put(USERCOLOR182, (Long)9868950);
        m_userColors.put(USERCOLOR183, (Long)1315860);
        m_userColors.put(USERCOLOR184, (Long)5196870);
        m_userColors.put(USERCOLOR185, (Long)13158600);
        m_userColors.put(USERCOLOR186, (Long)13816530);
        m_userColors.put(USERCOLOR187, (Long)12237240);
        m_userColors.put(USERCOLOR188, (Long)6579300);
        m_userColors.put(USERCOLOR189, (Long)5308415);
        m_userColors.put(USERCOLOR190, (Long)-12814890200);
        m_userColors.put(USERCOLOR191, (Long)-14474460050);
        m_userColors.put(USERCOLOR192, (Long)-13158600025);
        m_userColors.put(USERCOLOR193, (Long)14474460);
        m_userColors.put(USERCOLOR194, (Long)8421504);
        m_userColors.put(USERCOLOR195, (Long)150);
        m_userColors.put(USERCOLOR196, (Long)16777040);
        m_userColors.put(USERCOLOR197, (Long)4512217);
        m_userColors.put(USERCOLOR198, (Long)7368816);
        m_userColors.put(USERCOLOR199, (Long)12632256);
        m_userColors.put(USERCOLOR200, (Long)65535);
        m_userColors.put(USERCOLOR201, (Long)-16777215200);
        m_userColors.put(USERCOLOR202, (Long)-12814891240);
        m_userColors.put(USERCOLOR203, (Long)-15132390240);
        m_userColors.put(USERCOLOR204, (Long)-12);
        m_userColors.put(USERCOLOR205, (Long)8017630);
        m_userColors.put(USERCOLOR206, (Long)4765555);
        m_userColors.put(USERCOLOR207, (Long)-5457115200);
        m_userColors.put(USERCOLOR208, (Long)-5357708200);
        m_userColors.put(USERCOLOR209, (Long)7782671);
        m_userColors.put(USERCOLOR210, (Long)-14474460100);
        m_userColors.put(USERCOLOR211, (Long)-12814890230);
        m_userColors.put(USERCOLOR212, (Long)-7782671050);
        m_userColors.put(USERCOLOR213, (Long)-6310392050);
        m_userColors.put(USERCOLOR214, (Long)-12432042025);
        m_userColors.put(USERCOLOR215, (Long)14670553);
        m_userColors.put(USERCOLOR216, (Long)12102567);
        m_userColors.put(USERCOLOR217, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR218, FCColor::rgb(0, 0, 0));
        m_userColors.put(USERCOLOR219, FCColor::rgb(200, 200, 200));
        m_userColors.put(FCColor_Back, (Long)16777215);
        m_userColors.put(FCColor_Border, (Long)13158600);
        m_userColors.put(FCColor_Text, (Long)0);
        m_userColors.put(FCColor_DisabledBack, (Long)-25);
        m_userColors.put(FCColor_DisabledText, (Long)3289650);
        m_userColors.put(FCColor_Hovered, (Long)-12814891150);
        m_userColors.put(FCColor_Pushed, (Long)-12814891100);
    }else{
        /*m_userColors.put(USERCOLOR, FCColor::rgb(230, 230, 230));
         m_userColors.put(USERCOLOR100, FCColor::rgb(230, 230, 230));
         m_userColors.put(USERCOLOR101, FCColor::rgba(255, 255, 255, 100));
         m_userColors.put(USERCOLOR102, FCColor::rgb(255, 255, 255));
         m_userColors.put(USERCOLOR103, FCColor::rgb(0, 0, 0));
         m_userColors.put(USERCOLOR104, FCColor::rgb(42, 138, 195));
         m_userColors.put(USERCOLOR105, FCColor::rgba(255, 255, 255, 25));
         m_userColors.put(USERCOLOR106, FCColor::rgb(19, 21, 26));
         m_userColors.put(USERCOLOR107, FCColor::rgb(50, 50, 50));
         m_userColors.put(USERCOLOR108, FCColor::rgb(0, 0, 0));
         m_userColors.put(USERCOLOR109, FCColor::rgb(43, 138, 195));
         m_userColors.put(USERCOLOR110, FCColor::rgba(255, 255, 255, 200));
         m_userColors.put(USERCOLOR111, FCColor::rgb(19, 21, 26));
         m_userColors.put(USERCOLOR112, FCColor::rgba(50, 50, 50, 240));
         m_userColors.put(USERCOLOR113, FCColor::rgba(50, 50, 50, 100));
         m_userColors.put(USERCOLOR114, FCColor::rgb(46, 47, 49));;
         m_userColors.put(USERCOLOR115, FCColor::rgb(50, 50, 50));
         m_userColors.put(USERCOLOR116, FCColor::rgb(100, 100, 100));
         m_userColors.put(USERCOLOR117, FCColor::rgba(255, 255, 255, 5));
         m_userColors.put(USERCOLOR118, FCColor::rgba(255, 255, 255, 50));
         m_userColors.put(USERCOLOR119, FCColor::rgb(200, 200, 200));
         m_userColors.put(USERCOLOR120, FCColor::rgb(75, 75, 75));
         m_userColors.put(USERCOLOR121, FCColor::rgb(170, 178, 189));
         m_userColors.put(USERCOLOR122, FCColor::rgba(43, 138, 195, 100));
         m_userColors.put(USERCOLOR123, FCColor::rgb(100, 100, 100));
         m_userColors.put(USERCOLOR124, FCColor::rgb(255, 82, 82));
         m_userColors.put(USERCOLOR125, FCColor::rgb(50, 105, 217));
         m_userColors.put(USERCOLOR126, FCColor::rgb(255, 255, 255));
         m_userColors.put(USERCOLOR127, FCColor::rgb(200, 200, 200));
         m_userColors.put(USERCOLOR128, FCColor::rgb(80, 80, 80));
         m_userColors.put(USERCOLOR129, FCColor::rgb(25, 25, 25));
         m_userColors.put(USERCOLOR130, FCColor::rgb(255, 0, 0));
         m_userColors.put(USERCOLOR131, FCColor::rgb(139, 180, 248));
         m_userColors.put(USERCOLOR132, FCColor::rgb(0, 165, 137));
         m_userColors.put(USERCOLOR133, FCColor::rgb(230, 230, 230));
         m_userColors.put(USERCOLOR134, FCColor::rgba(100, 100, 100, 200));
         m_userColors.put(USERCOLOR135, FCColor::rgba(43, 138, 195, 200));
         m_userColors.put(USERCOLOR136, FCColor::rgb(255, 80, 80));
         m_userColors.put(USERCOLOR137, FCColor::rgba(43, 138, 195, 25));
         m_userColors.put(USERCOLOR138, FCColor::rgba(51, 153, 255, 75));
         m_userColors.put(USERCOLOR139, FCColor::rgb(0, 200, 0));
         m_userColors.put(USERCOLOR140, FCColor::rgba(0, 0, 0, 10));
         m_userColors.put(USERCOLOR141, FCColor::rgba(50, 50, 50, 50));
         m_userColors.put(USERCOLOR142, FCColor::rgb(0, 105, 217));
         m_userColors.put(USERCOLOR143, FCColor::rgba(255, 255, 255, 150));
         m_userColors.put(USERCOLOR144, FCColor::rgba(255, 0, 0, 200));
         m_userColors.put(USERCOLOR145, FCColor::rgba(170, 178, 189, 50));
         m_userColors.put(USERCOLOR146, FCColor::rgba(170, 178, 189, 200));
         m_userColors.put(USERCOLOR147, FCColor::rgb(219, 68, 83));
         m_userColors.put(USERCOLOR148, FCColor::rgb(255, 80, 80));
         m_userColors.put(USERCOLOR149, FCColor::rgb(246, 187, 67));
         m_userColors.put(USERCOLOR150, FCColor::rgb(59, 174, 218));
         m_userColors.put(USERCOLOR151, FCColor::rgb(216, 112, 173));
         m_userColors.put(USERCOLOR152, FCColor::rgb(140, 192, 81));
         m_userColors.put(USERCOLOR153, FCColor::rgb(80, 255, 80));
         m_userColors.put(USERCOLOR154, FCColor::rgba(255, 80, 80, 200));
         m_userColors.put(USERCOLOR155, FCColor::rgba(50, 50, 50, 150));
         m_userColors.put(USERCOLOR156, FCColor::rgba(0, 105, 217, 240));
         m_userColors.put(USERCOLOR157, FCColor::rgba(0, 0, 0, 25));
         m_userColors.put(USERCOLOR158, FCColor::rgb(255, 215, 0));
         m_userColors.put(USERCOLOR159, FCColor::rgb(150, 150, 150));
         m_userColors.put(USERCOLOR160, FCColor::rgba(0, 0, 0, 200));
         m_userColors.put(USERCOLOR161, FCColor::rgba(43, 138, 195, 50));
         m_userColors.put(USERCOLOR162, FCColor::rgb(10, 36, 106));
         m_userColors.put(USERCOLOR163, FCColor::rgb(21, 24, 28));
         m_userColors.put(USERCOLOR164, FCColor::rgba(0, 0, 0, 100));
         m_userColors.put(USERCOLOR165, FCColor::rgba(0, 0, 0, 50));
         m_userColors.put(USERCOLOR166, FCColor::rgb(230, 230, 230));
         m_userColors.put(USERCOLOR167, FCColor::rgb(32, 36, 38));
         m_userColors.put(USERCOLOR168, FCColor::rgb(248, 73, 96));
         m_userColors.put(USERCOLOR169, FCColor::rgb(15, 193, 118));
         m_userColors.put(USERCOLOR170, FCColor::rgba(248, 73, 96, 150));
         m_userColors.put(USERCOLOR171, FCColor::rgba(15, 193, 118, 150));
         m_userColors.put(USERCOLOR172, FCColor::rgb(130, 140, 150));
         m_userColors.put(USERCOLOR173, FCColor::rgba(94, 102, 115, 200));
         m_userColors.put(USERCOLOR174, FCColor::rgb(83, 195, 42));
         m_userColors.put(USERCOLOR175, FCColor::rgb(231, 192, 42));
         m_userColors.put(USERCOLOR176, FCColor::rgb(254, 89, 82));
         m_userColors.put(USERCOLOR177, FCColor::rgba(42, 138, 195, 100));
         m_userColors.put(USERCOLOR178, FCColor::rgb(52, 53, 58));
         m_userColors.put(USERCOLOR179, FCColor::rgba(52, 53, 58, 150));
         m_userColors.put(USERCOLOR180, FCColor::rgb(16, 95, 205));
         m_userColors.put(USERCOLOR181, FCColor::rgba(16, 95, 205, 100));
         m_userColors.put(USERCOLOR182, FCColor::rgb(107, 107, 107));
         m_userColors.put(USERCOLOR183, FCColor::rgb(233, 233, 233));
         m_userColors.put(USERCOLOR184, FCColor::rgb(70, 76, 79));
         m_userColors.put(USERCOLOR185, FCColor::rgb(50, 82, 114));
         m_userColors.put(USERCOLOR186, FCColor::rgb(39, 41, 46));
         m_userColors.put(USERCOLOR187, FCColor::rgb(184, 185, 186));
         m_userColors.put(USERCOLOR188, FCColor::rgb(150, 150, 150));
         m_userColors.put(USERCOLOR189, FCColor::rgb(255, 255, 80));
         m_userColors.put(USERCOLOR190, FCColor::rgba(42, 138, 195, 200));
         m_userColors.put(USERCOLOR191, FCColor::rgba(32, 36, 38, 50));;
         m_userColors.put(USERCOLOR192, FCColor::rgba(50, 50, 50, 25));
         m_userColors.put(USERCOLOR193, FCColor::rgb(50, 50, 50));
         m_userColors.put(USERCOLOR194, FCColor::rgb(128, 128, 128));
         m_userColors.put(USERCOLOR195, FCColor::rgb(150, 0, 0));
         m_userColors.put(USERCOLOR196, FCColor::rgb(80, 255, 255));
         m_userColors.put(USERCOLOR197, FCColor::rgb(217, 217, 68));
         m_userColors.put(USERCOLOR198, FCColor::rgb(112, 112, 112));
         m_userColors.put(USERCOLOR199, FCColor::rgb(192, 192, 192));
         m_userColors.put(USERCOLOR200, FCColor::rgb(255, 255, 0));
         m_userColors.put(USERCOLOR201, FCColor::rgba(0, 0, 0, 200));
         m_userColors.put(USERCOLOR202, FCColor::rgba(43, 138, 195, 240));
         m_userColors.put(USERCOLOR203, FCColor::rgba(21, 24, 28, 240));
         m_userColors.put(USERCOLOR204, FCColor::rgba(255, 255, 255, 12));
         m_userColors.put(USERCOLOR205, FCColor::rgb(222, 86, 122));
         m_userColors.put(USERCOLOR206, FCColor::rgb(115, 183, 72));
         m_userColors.put(USERCOLOR207, FCColor::rgba(219, 68, 83, 200));
         m_userColors.put(USERCOLOR208, FCColor::rgba(140, 192, 81, 200));
         m_userColors.put(USERCOLOR209, FCColor::rgb(15, 193, 118));
         m_userColors.put(USERCOLOR210, FCColor::rgba(32, 36, 38, 100));
         m_userColors.put(USERCOLOR211, FCColor::rgba(42, 138, 195, 230));
         m_userColors.put(USERCOLOR212, FCColor::rgba(15, 193, 118, 50));
         m_userColors.put(USERCOLOR213, FCColor::rgba(248, 73, 96, 50));
         m_userColors.put(USERCOLOR214, FCColor::rgba(170, 178, 189, 25));
         m_userColors.put(USERCOLOR215, FCColor::rgb(217, 218, 223));
         m_userColors.put(USERCOLOR216, FCColor::rgb(167, 171, 184));
         m_userColors.put(FCColor_Back, FCColor::rgb(19, 21, 26));
         m_userColors.put(FCColor_Border, FCColor::rgb(50, 50, 50));
         m_userColors.put(FCColor_Text, FCColor::rgb(255, 255, 255));
         m_userColors.put(FCColor_DisabledBack, FCColor::rgba(255, 255, 255, 25));
         m_userColors.put(FCColor_DisabledText, 3289650);
         m_userColors.put(FCColor_Hovered, FCColor::rgba(43, 138, 195, 150));
         m_userColors.put(FCColor_Pushed, FCColor::rgba(43, 138, 195, 100));*/
        
        
        m_userColors.put(USERCOLOR100, (Long)15132390);
        m_userColors.put(USERCOLOR101, (Long)-16777215100);
        m_userColors.put(USERCOLOR102, (Long)16777215);
        m_userColors.put(USERCOLOR103, (Long)0);
        m_userColors.put(USERCOLOR104, (Long)12814890);
        m_userColors.put(USERCOLOR105, (Long)-16777215025);
        m_userColors.put(USERCOLOR106, (Long)1709331);
        m_userColors.put(USERCOLOR107, (Long)3289650);
        m_userColors.put(USERCOLOR108, (Long)0);
        m_userColors.put(USERCOLOR109, (Long)12814891);
        m_userColors.put(USERCOLOR110, (Long)-16777215200);
        m_userColors.put(USERCOLOR111, (Long)1709331);
        m_userColors.put(USERCOLOR112, (Long)-3289650240);
        m_userColors.put(USERCOLOR113, (Long)-3289650100);
        m_userColors.put(USERCOLOR114, (Long)3223342);
        m_userColors.put(USERCOLOR115, (Long)3289650);
        m_userColors.put(USERCOLOR116, (Long)6579300);
        m_userColors.put(USERCOLOR117, (Long)-16777215005);
        m_userColors.put(USERCOLOR118, (Long)-16777215050);
        m_userColors.put(USERCOLOR119, (Long)13158600);
        m_userColors.put(USERCOLOR120, (Long)4934475);
        m_userColors.put(USERCOLOR121, (Long)12432042);
        m_userColors.put(USERCOLOR122, (Long)-12814891100);
        m_userColors.put(USERCOLOR123, (Long)6579300);
        m_userColors.put(USERCOLOR124, (Long)5395199);
        m_userColors.put(USERCOLOR125, (Long)14248242);
        m_userColors.put(USERCOLOR126, (Long)16777215);
        m_userColors.put(USERCOLOR127, (Long)13158600);
        m_userColors.put(USERCOLOR128, (Long)5263440);
        m_userColors.put(USERCOLOR129, (Long)1644825);
        m_userColors.put(USERCOLOR130, (Long)255);
        m_userColors.put(USERCOLOR131, (Long)16299147);
        m_userColors.put(USERCOLOR132, (Long)9020672);
        m_userColors.put(USERCOLOR133, (Long)15132390);
        m_userColors.put(USERCOLOR134, (Long)-6579300200);
        m_userColors.put(USERCOLOR135, (Long)-12814891200);
        m_userColors.put(USERCOLOR136, (Long)5263615);
        m_userColors.put(USERCOLOR137, (Long)-12814891025);
        m_userColors.put(USERCOLOR138, (Long)-16750899075);
        m_userColors.put(USERCOLOR139, (Long)51200);
        m_userColors.put(USERCOLOR140, (Long)-10);
        m_userColors.put(USERCOLOR141, (Long)-3289650050);
        m_userColors.put(USERCOLOR142, (Long)14248192);
        m_userColors.put(USERCOLOR143, (Long)-16777215150);
        m_userColors.put(USERCOLOR144, (Long)-255200);
        m_userColors.put(USERCOLOR145, (Long)-12432042050);
        m_userColors.put(USERCOLOR146, (Long)-12432042200);
        m_userColors.put(USERCOLOR147, (Long)5457115);
        m_userColors.put(USERCOLOR148, (Long)5263615);
        m_userColors.put(USERCOLOR149, (Long)4439030);
        m_userColors.put(USERCOLOR150, (Long)14331451);
        m_userColors.put(USERCOLOR151, (Long)11366616);
        m_userColors.put(USERCOLOR152, (Long)5357708);
        m_userColors.put(USERCOLOR153, (Long)5308240);
        m_userColors.put(USERCOLOR154, (Long)-5263615200);
        m_userColors.put(USERCOLOR155, (Long)-3289650150);
        m_userColors.put(USERCOLOR156, (Long)-14248192240);
        m_userColors.put(USERCOLOR157, (Long)-25);
        m_userColors.put(USERCOLOR158, (Long)55295);
        m_userColors.put(USERCOLOR159, (Long)9868950);
        m_userColors.put(USERCOLOR160, (Long)-200);
        m_userColors.put(USERCOLOR161, (Long)-12814891050);
        m_userColors.put(USERCOLOR162, (Long)6956042);
        m_userColors.put(USERCOLOR163, (Long)1841173);
        m_userColors.put(USERCOLOR164, (Long)-100);
        m_userColors.put(USERCOLOR165, (Long)-50);
        m_userColors.put(USERCOLOR166, (Long)15132390);
        m_userColors.put(USERCOLOR167, (Long)2499616);
        m_userColors.put(USERCOLOR168, (Long)6310392);
        m_userColors.put(USERCOLOR169, (Long)7782671);
        m_userColors.put(USERCOLOR170, (Long)-6310392150);
        m_userColors.put(USERCOLOR171, (Long)-7782671150);
        m_userColors.put(USERCOLOR172, (Long)9866370);
        m_userColors.put(USERCOLOR173, (Long)-7562846200);
        m_userColors.put(USERCOLOR174, (Long)2802515);
        m_userColors.put(USERCOLOR175, (Long)2801895);
        m_userColors.put(USERCOLOR176, (Long)5396990);
        m_userColors.put(USERCOLOR177, (Long)-12814890100);
        m_userColors.put(USERCOLOR178, (Long)3814708);
        m_userColors.put(USERCOLOR179, (Long)-3814708150);
        m_userColors.put(USERCOLOR180, (Long)13459216);
        m_userColors.put(USERCOLOR181, (Long)-13459216100);
        m_userColors.put(USERCOLOR182, (Long)7039851);
        m_userColors.put(USERCOLOR183, (Long)15329769);
        m_userColors.put(USERCOLOR184, (Long)5196870);
        m_userColors.put(USERCOLOR185, (Long)7492146);
        m_userColors.put(USERCOLOR186, (Long)3025191);
        m_userColors.put(USERCOLOR187, (Long)12237240);
        m_userColors.put(USERCOLOR188, (Long)9868950);
        m_userColors.put(USERCOLOR189, (Long)5308415);
        m_userColors.put(USERCOLOR190, (Long)-12814890200);
        m_userColors.put(USERCOLOR191, (Long)-2499616050);
        m_userColors.put(USERCOLOR192, (Long)-3289650025);
        m_userColors.put(USERCOLOR193, (Long)3289650);
        m_userColors.put(USERCOLOR194, (Long)8421504);
        m_userColors.put(USERCOLOR195, (Long)150);
        m_userColors.put(USERCOLOR196, (Long)16777040);
        m_userColors.put(USERCOLOR197, (Long)4512217);
        m_userColors.put(USERCOLOR198, (Long)7368816);
        m_userColors.put(USERCOLOR199, (Long)12632256);
        m_userColors.put(USERCOLOR200, (Long)65535);
        m_userColors.put(USERCOLOR201, (Long)-200);
        m_userColors.put(USERCOLOR202, (Long)-12814891240);
        m_userColors.put(USERCOLOR203, (Long)-1841173240);
        m_userColors.put(USERCOLOR204, (Long)-16777215012);
        m_userColors.put(USERCOLOR205, (Long)8017630);
        m_userColors.put(USERCOLOR206, (Long)4765555);
        m_userColors.put(USERCOLOR207, (Long)-5457115200);
        m_userColors.put(USERCOLOR208, (Long)-5357708200);
        m_userColors.put(USERCOLOR209, (Long)7782671);
        m_userColors.put(USERCOLOR210, (Long)-2499616100);
        m_userColors.put(USERCOLOR211, (Long)-12814890230);
        m_userColors.put(USERCOLOR212, (Long)-7782671050);
        m_userColors.put(USERCOLOR213, (Long)-6310392050);
        m_userColors.put(USERCOLOR214, (Long)-12432042025);
        m_userColors.put(USERCOLOR215, (Long)14670553);
        m_userColors.put(USERCOLOR216, (Long)12102567);
        m_userColors.put(USERCOLOR217, FCColor::rgb(194, 151, 18));
        m_userColors.put(USERCOLOR218, FCColor::rgb(175, 196, 228));
        m_userColors.put(USERCOLOR219, FCColor::rgb(75, 75, 75));
        m_userColors.put(FCColor_Back, (Long)1380366);
        m_userColors.put(FCColor_Border, (Long)3289650);
        m_userColors.put(FCColor_Text, (Long)16777215);
        m_userColors.put(FCColor_DisabledBack, (Long)-16777215025);
        m_userColors.put(FCColor_DisabledText, (Long)3289650);
        m_userColors.put(FCColor_Hovered, (Long)-12814891150);
    }
}

Long MyColor::getUserColor(Long color){
    if (m_lastStyle != m_style)
    {
        m_lastStyle = m_style;
       createColors();
    }
    m_userColors.tryget(color, &color);
    return color;
}

FCSize FCDraw::drawText(FCPaint *paint, String text, Long dwPenColor, FCFont *font, int x, int y){
    FCSize tSize = paint->textSize(text, font, -1);
    FCRect tRect = {x, y, x + tSize.cx, y+ tSize.cy};
    paint->drawText(text, dwPenColor, font, tRect, -1);
    return tSize;
}

int FCDraw::drawUnderLineNum(FCPaint *paint, double value, int digit, FCFont *font, Long fontColor, bool zeroAsEmpty, int x, int y){
    if (zeroAsEmpty && value == 0)
    {
        String text = L"-";
        FCSize size = paint->textSize(text, font, -1);
        FCDraw::drawText(paint, text, fontColor, font, x, y);
        return size.cx;
    }
    else
    {
        String strValue = FCTran::getValueByDigit(value, digit);
        ArrayList<String> nbs = FCTran::split(strValue, L".");
        if (nbs.size() == 1)
        {
            FCSize size = paint->textSize(nbs.get(0), font, -1);
            FCDraw::drawText(paint, nbs.get(0), fontColor, font, x, y);
            return size.cx;
        }
        else
        {
            FCSize decimalSize = paint->textSize(nbs.get(0) + L".", font, -1);
            FCSize size = paint->textSize(nbs.get(1), font, -1);
            FCDraw::drawText(paint, nbs.get(0) + L".", fontColor, font, x, y);
            FCDraw::drawText(paint, nbs.get(1), fontColor, font, x
                + decimalSize.cx + 1, y);
            return decimalSize.cx + size.cx;
        }
    }
    return 0;
}

int FCDraw::drawUnderLineNum2(FCPaint *paint, double value, int digit, FCFont *font, Long fontColor, bool zeroAsEmpty, int x, int y){
    if (zeroAsEmpty && value == 0)
    {
        String text = L"-";
        FCSize size = paint->textSize(text, font, -1);
        FCDraw::drawText(paint, text, fontColor, font, x, y);
        return size.cx;
    }
    else
    {
        String strValue = FCTran::getValueByDigit(value, digit);
        ArrayList<String> nbs = FCTran::split(strValue, L".");
        if (nbs.size() == 1)
        {
            FCSize size = paint->textSize(nbs.get(0), font, -1);
            FCDraw::drawText(paint, nbs.get(0), fontColor, font, x, y);
            return size.cx;
        }
        else
        {
            FCSize decimalSize = paint->textSize(nbs.get(0) + L".", font, -1);
            FCSize size = paint->textSize(nbs.get(1), font, -1);
            FCDraw::drawText(paint, nbs.get(0) + L".", fontColor, font, x, y);
            FCDraw::drawText(paint, nbs.get(1), fontColor, font, x
                + decimalSize.cx + 1, y);
            return decimalSize.cx + size.cx;
        }
    }
    return 0;
}

Long FCDraw::getPriceColor(double price, double comparePrice){
    if (price != 0)
    {
        if (price > comparePrice)
        {
            return FCColor::rgb(255, 82, 82);
        }
        else if(price < comparePrice)
        {
            return FCColor::rgb(46, 255, 50);
        }
    }
    return FCColor::rgb(190, 190, 235);
}
